<?php
/**
 * Created by zengxianfen on 2020/7/17 11:36.
 */

namespace App\Controller;


use App\Model\Manager\RegisterManager;
use App\Request\CompanyRegisterRequest;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;

/**
 * @Controller()
 * Class CompanyController
 * @package App\Controller
 */
class CompanyController extends AbstractController
{
    /**
     * @Inject()
     * @var RegisterManager
     */
    protected $manager;

    /**
     * @RequestMapping("/company/register", methods={RequestMapping::POST})
     * @author zengxianfen 2020/7/17
     */
    public function register(CompanyRegisterRequest $request) {
        $this->manager->registerCompany($request->all());
        return $this->success();
    }

}